package edu.ccut.saturn.component.impl.directory;


import org.osgi.framework.Bundle;

import edu.ccut.saturn.component.IBundleInfo;

public class SaturnDataDictDirectoryInfo extends AbstractDirectoryInfo {

//	private static final String SATURN_DATADICT_FILE_POSTFIX = ".datadict";

	public SaturnDataDictDirectoryInfo() {
		super(SATURN_DIRECTORY_TYPE_DATADICT);
	}

	@SuppressWarnings("unchecked")
	@Override
	public void load(Bundle bundle, IBundleInfo bundleInfo) {
		// Enumeration<String> dataFiles = bundle.getEntryPaths(super
		// .getDirectoryPath());
		//
		// while (dataFiles.hasMoreElements()) {
		// String dataFile = dataFiles.nextElement();
		//
		// try {
		//
		// if (dataFile != null) {
		//
		// if (dataFile.endsWith(SATURN_DATADICT_FILE_POSTFIX)) {
		// bundleInfo.getBundleDictTypeInfo().addDataDictTypeInfo(
		// SaturnDataDictLoader.loadDataDictTypeInfo(
		// bundle, dataFile));
		// }
		// }
		//
		// } catch (SaturnComponentException e) {
		// logger
		// .error("load data dict Directory failed! the file name is \""
		// + dataFile
		// + "\" in bundle ["
		// + bundle.getSymbolicName() + "]", e);
		// }
		// }
	}
}
